﻿using System;
using System.ComponentModel;

namespace Lastfm7.ViewModels
{
    public class MenuItemViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        private string title = string.Empty;
        private string description = string.Empty;

        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                PropertyChanged.Raise(this, "Title");
            }
        }

        public string Description
        {
            get { return description; }
            set
            {
                description = value;
                PropertyChanged.Raise(this, "Description");
            }
        }

        protected virtual string PageName { get { throw new NotImplementedException();  } }

        public MenuItemViewModel() { }

        public MenuItemViewModel(string title, string description)
        {
            Title = title;
            Description = description;
        }

        public Uri GetPageUri()
        {
            return new Uri("/{0}".Fmt(PageName), UriKind.Relative);
        }
    }
}
